/**************************************************************************
 *
 * Copyright (C) 2007 University of California, Los Angeles.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *************************************************************************/

package edu.ucla.cs.typecast.app.auction;

import java.io.*;
import java.util.*;

/**
 * An event that indicates an auction is ongoing.
 */

public class AuctionUpdateEvent implements Serializable {
	/**
	 * Serial number for serialization.
	 */

	private static final long serialVersionUID = 1L;

	/**
	 * Seller.
	 */

	protected ParticipantInfo sellerInfo;

	/**
	 * Highest bidder.
	 */

	protected ParticipantInfo highestBidderInfo;

	/**
	 * Item to be bidded on.
	 */

	protected ItemInfo itemInfo;

	/**
	 * Current price.
	 */

	protected int price;

	/**
	 * Seller's current time.
	 */

	protected Date currentTime;

	/**
	 * End time of the auction.
	 */

	protected Date endTime;

	public AuctionUpdateEvent(ItemInfo itemInfo, int price, Date currentTime,
			Date endTime, ParticipantInfo sellerInfo,
			ParticipantInfo highestBidderInfo) {
		super();
		this.itemInfo = itemInfo;
		this.price = price;
		this.currentTime = currentTime;
		this.endTime = endTime;
		this.sellerInfo = sellerInfo;
		this.highestBidderInfo = highestBidderInfo;
	}

	public Date getCurrentTime() {
		return currentTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public ParticipantInfo getHighestBidderInfo() {
		return highestBidderInfo;
	}

	public ItemInfo getItemInfo() {
		return itemInfo;
	}

	public int getPrice() {
		return price;
	}

	public ParticipantInfo getSellerInfo() {
		return sellerInfo;
	}

	public void setCurrentTime(Date currentTime) {
		this.currentTime = currentTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public void setHighestBidderInfo(ParticipantInfo highestBidderInfo) {
		this.highestBidderInfo = highestBidderInfo;
	}

	public void setItemId(ItemInfo itemInfo) {
		this.itemInfo = itemInfo;
	}

	public void setItemInfo(ItemInfo itemInfo) {
		this.itemInfo = itemInfo;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public void setSellerInfo(ParticipantInfo sellerInfo) {
		this.sellerInfo = sellerInfo;
	}

}
